package com.eastfair.pay.api;
import com.eastfair.common.dto.AttachmentFileDTO;
import com.eastfair.common.entity.AttachmentFile;
import com.eastfair.common.vo.AttachmentFileVO;
import com.eastfair.core.base.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;

@FeignClient(value = "common-service/attachmentFile")
public interface AttachmentFileFeign {
    @PostMapping(value = "/saveOrUpdateAttachmentFile")
    R<List<AttachmentFileVO>> addAttachmentFile(@RequestBody List<AttachmentFileDTO> attachmentFileDTOs);
    @PostMapping(value = "/queryAttachmentFile")
    R<List<AttachmentFileVO>> queryAttachmentFile(@RequestBody AttachmentFileDTO attachmentFileDTO);
    @PostMapping(value = "/queryBatch")
    R<List<AttachmentFileVO>> queryBatch(@RequestBody List<Long> ids);
    @GetMapping(value = "/detele/{id}")
    R detele(@PathVariable("id") Long id);
    @PostMapping("/detele")
    R deteleBatch(@RequestBody List<Long> ids);
    @PostMapping("/queryById/{id}")
    R<AttachmentFileVO> query(@PathVariable("id") Long id);

}
